package com.woniuxy02;

public class Test02 {
    public static void main(String[] args) {
        int[] a = {1, 2, 3, 4, 5};
        int t;
//        for (int i = 0; i < a.length / 2; i++) {
//            t=a[i];
//            a[i]=a[a.length - i - 1];
//            a[a.length - i - 1]=t;
//        }

        for (int i = 0,j=a.length-1; i < a.length ; i++,j--) {
            t = a[i];
            a[i] = a[j];
            a[j] = t;
        }


        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }
    }
}
